const { Schema, model } = require("mongoose");
const collectionsSchema = new Schema(
  {
    studentId: {   // 所属学员 _id
        type: Schema.Types.ObjectId,
        ref: 'studentsModel'
    },
    exerciseId: {
        type: Schema.Types.ObjectId,
        ref: 'exercisesModel'
    }
},
  { versionKey: false }
);
// 配置数据模型
const collectionsModel = model(
  "collectionsModel",
  collectionsSchema,
  "collections"
);
//module.exports.classesModel = classesModel;
module.exports = {
  collectionsModel
};
